import {createRouter, createWebHashHistory} from "vue-router";

import Welcome from "../components/Welcome.vue";
import Login from "../components/Login.vue";
import ConsoleDashboard from "../components/console/ConsoleDashboard.vue";
import ConsoleHome from "../components/console/ConsoleHome.vue";
import MetadataSource from "../components/metadata/MetadataSource.vue";
import MetadataTable from "../components/metadata/MetadataTable.vue";

const routes = [
    {path: '/', component: Welcome},
    {
        path: '/console', component: ConsoleHome,
        children: [
            {name:"menu_dashboard",path: '', component: ConsoleDashboard },
            {name:"menu_md_source",path: '/console/metadata/datasource', component: MetadataSource },
            {name:"menu_md_table",path: '/console/metadata/table', component: MetadataTable },
        ]
    },
    {path: '/login', component: Login}
]


const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router
